button: Remove _{get,set}_focus_click
authorTimm Bäder <mail@baedert.org>
Sun, 2 Oct 2016 17:54:37 +0000 (19:54 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Oct 2016 16:17:21 +0000 (18:17 +0200)
Deprecated for the GtkWidget variant. Also remove some unused fields
from the GtkButtonPrivate struct.

gtk/gtkbutton.c
gtk/gtkbutton.h
gtk/gtkbuttonprivate.h

index 237e4f40ed8f08eb2c0910866052a5ba19af5177..4b17c3338f54bd177e2fdfae7b057e4901db8235 100644 (file)
@@ -1704,51 +1704,6 @@ gtk_button_get_use_underline (GtkButton *button)
   return button->priv->use_underline;
 }
 
-/**
- * gtk_button_set_focus_on_click:
- * @button: a #GtkButton
- * @focus_on_click: whether the button grabs focus when clicked with the mouse
- *
- * Sets whether the button will grab focus when it is clicked with the mouse.
- * Making mouse clicks not grab focus is useful in places like toolbars where
- * you don’t want the keyboard focus removed from the main area of the
- * application.
- *
- * Since: 2.4
- *
- * Deprecated: 3.20: Use gtk_widget_set_focus_on_click() instead
- */
-void
-gtk_button_set_focus_on_click (GtkButton *button,
-                              gboolean   focus_on_click)
-{
-  g_return_if_fail (GTK_IS_BUTTON (button));
-
-  gtk_widget_set_focus_on_click (GTK_WIDGET (button), focus_on_click);
-}
-
-/**
- * gtk_button_get_focus_on_click:
- * @button: a #GtkButton
- *
- * Returns whether the button grabs focus when it is clicked with the mouse.
- * See gtk_button_set_focus_on_click().
- *
- * Returns: %TRUE if the button grabs focus when it is clicked with
- *               the mouse.
- *
- * Since: 2.4
- *
- * Deprecated: 3.20: Use gtk_widget_get_focus_on_click() instead
- */
-gboolean
-gtk_button_get_focus_on_click (GtkButton *button)
-{
-  g_return_val_if_fail (GTK_IS_BUTTON (button), FALSE);
-
-  return gtk_widget_get_focus_on_click (GTK_WIDGET (button));
-}
-
 static void
 gtk_button_update_state (GtkButton *button)
 {
index 0fa61f58ec059112f39446dd47732d50cef4bfbe..1965692c333f4ae40ee09aec45f46a75d3b816bb 100644 (file)
@@ -111,11 +111,6 @@ void                  gtk_button_set_use_underline  (GtkButton      *button,
                                                     gboolean        use_underline);
 GDK_AVAILABLE_IN_ALL
 gboolean              gtk_button_get_use_underline  (GtkButton      *button);
-GDK_DEPRECATED_IN_3_20_FOR(gtk_widget_set_focus_on_click)
-void                  gtk_button_set_focus_on_click (GtkButton      *button,
-                                                    gboolean        focus_on_click);
-GDK_DEPRECATED_IN_3_20_FOR(gtk_widget_get_focus_on_click)
-gboolean              gtk_button_get_focus_on_click (GtkButton      *button);
 GDK_AVAILABLE_IN_ALL
 void                  gtk_button_set_image          (GtkButton      *button,
                                                     GtkWidget      *image);
index 5114a9926b9254451168b9fc9e8704f27b9fc5e8..a93fe184e06dfac6ccb58b5fbb57f1af1fde4faf 100644 (file)
@@ -41,9 +41,6 @@ struct _GtkButtonPrivate
 
   GtkGesture            *gesture;
 
-  gfloat                 xalign;
-  gfloat                 yalign;
-
   /* This is only used by checkbox and subclasses */
   gfloat                 baseline_align;
 
@@ -55,10 +52,8 @@ struct _GtkButtonPrivate
   guint          align_set             : 1;
   guint          button_down           : 1;
   guint          constructed           : 1;
-  guint          image_is_stock        : 1;
   guint          in_button             : 1;
   guint          use_action_appearance : 1;
-  guint          use_stock             : 1;
   guint          use_underline         : 1;
   guint          always_show_image     : 1;
 };